
Model = {
	pos	 				= Vector:New( { x = 0, y = 0, z = 0 } ),
	dir					= Vector:New( { x = 1, y = 0, z = 0 } ),
	dest 				= Vector:New( { x = 0, y = 0, z = 0 } ),
	id		 			= "",
	modelfile 	= "",
	curranim 		= "",
	angle 			= 0,
	state 			= "",
}

function Model:New( o )
	local o = o or {}
	setmetatable( o, self )
	self.__index = self
	return o
end
function Model:SetPos( v )
	self.pos.x = v.x
	self.pos.y = v.y
	self.pos.z = v.z
end
function Model:SetDir( dir )
	self.dir = dir
end
function Model:SetDest( dest )
	self.dest = dest
end
function Model:SetID( id )
	self.id = id
end
function Model:SetModelfile( modelfile )
	self.modelfile = modelfile
end
function Model:Rotate( angle )
	self.angle = angle
end
function Model:playanim( anim )
	self.curranim = self.animlist[ anim ]
end


--models
ModelTemplate = {
	hellknight = {
			id = "hellknight",		
			modelfile = PATH.."hellknight",
			pos = Vector:New( { x = 0, y = 0, z = 625 } ),
			dir = Vector:New( { x = -1, y = 0, z = 0 } ),
			dest = Vector:New( { x = 0, y = 0, z = 625 } ), 
			collisionRadius = 100.0,
			angle = math.pi,
			curranim = "idle2",
			animlist = { idle = "idle2", walk = "walk7", attack = "attack3", 
									 leftslash = "leftslash", pain = "headpain" },
	},
	cherub = {
			id = "cherub",	
			modelfile = PATH.."cherub",
			pos = Vector:New( { x = 0, y = 0, z = 0 } ),
			dir = Vector:New( { x = 1, y = 0, z= 0 } ),
			dest = Vector:New( { x = 0, y = 0, z = 0 } ),
			collisionRadius = 100.0,
			angle = 0,
			curranim = "initial",
			animlist = { idle = "initial", walk = "crawl1", },	
	},
	archvile = {
		id = "archvile",
		modelfile = PATH.."archvile",
		pos = Vector:New( { x = 0, y = 0, z = 0 } ),
		dir = Vector:New( { x = 1, y = 0, z = 0 } ),
		dest = Vector:New( { x = 0, y = 0, z = 0 } ),
		collisionRadius = 100.0,
		angle = 0,
		curranim = "idle",
		animlist = { idle = "idle", walk = "walk" , pain = "pain_head1" },
	},
	player = {
		id = "player",
		modelfile = PATH.."player",
		pos = Vector:New( { x = 0, y = 0, z = 325 } ),
		dir = Vector:New( { x = -1, y = 0, z = 0 } ),
		dest = Vector:New( { x = 0, y = 0, z = 325 } ), 
		collisionRadius = 100.0,
		angle = math.pi,
		curranim = "",
		animlist = { idle = ""},
	},
}
